<template>
  <el-descriptions direction="vertical" :column="3" border>
    <el-descriptions-item label="活动名" :span="3">{{this.luckUser[0].drawName}}</el-descriptions-item>
    <template  v-for="luckUser in this.luckUser">
      <el-descriptions-item label="奖项名">{{luckUser.title}}</el-descriptions-item>
      <el-descriptions-item label="奖品名">{{luckUser.prizeName}}</el-descriptions-item>
      <el-descriptions-item label="中奖名单">
        <p v-for="user in luckUser.users">
          {{user.userId}} - {{user.userName}}
        </p>
      </el-descriptions-item>
    </template>

  </el-descriptions>

</template>

<script>
export default {
  name: "DrawInfo",
  data() {
    return {
      luckUser: [
        {
          drawName: "",
          prizeId: "",
          drawId: "",
          title: "",
          prizeName: "",
          user: []
        }
      ],
    }
  },
  created() {
    this.$axios.get("/draw/getLuckyUsersById/"+ this.$route.params.id).then(res => {
     this.luckUser  = res.data.data
    })
  }
}
</script>

<style scoped>

</style>
